package com.zh.rent.service;

import com.github.pagehelper.PageInfo;
import com.zh.rent.pojo.Account;
import com.zh.rent.pojo.BuyAccount;
import com.zh.rent.pojo.Invitation;
import com.zh.rent.pojo.StandbyAccount;
import io.lettuce.core.dynamic.annotation.Param;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

public interface InvitationService {

    //后台添加多行数据
    int insertInvAll(List<Invitation> list);

    //后台邀请码显示
    PageInfo<Map<String,Object>> selInvAll(Integer pageNum,Integer pageSeiz, Map<String,Object> map);

    //根据id修改
    int updateInv(Invitation invitation);

    //批量删除
    int delInvBccAll(List<Integer> list);
    //根据id删除
    int delInvBccid(Integer Invitationid);
    //购买大厅显示
    Map<String,List<Invitation>> selAll();

    //根据金额类型天数查找出对应的邀请码账号id
    List<Invitation> invDissel(Map<String,Object> map);

    //分配邀请码
    Invitation invDis(Map<String,Object> map);

    //修改状态2未使用
    int updateInvDis(Map<String,Object> map);
    //通过凭证查询
    List<Map<String,Object>> selVoucherInvAll(String Voucher);
    //通过邀请码查询
    Invitation selCodeInv(String code);
    //修改邀请码使用状态1使用中
    int updateType(Integer Invitationid,Timestamp timestamp);
    //登录次数减一
    int updatelogNum(int Invitationid);

    //根据类型查找天数以及对应金额
    List<Map<String,Object>> invselType(String invselType);
    //邀请码续费
    int upvtRenew(@Param("residue")Integer residue,@Param("InvitationCode")String InvitationCode);
    //到期天数减一，登录次数加3
    int uplogres(Integer logNum);

    //查询所有的邀请码
    List<Invitation>selInvall();

    //通过邀请id查询
    Invitation upInvgive(@Param("Invitationid")Integer Invitationid);

    //根据设置表修改登录设置
    int uplog(@Param("logNum")Integer logNum);
}
